﻿@{
    Layout = null;
}

<div class="row">

    <div class="panel panel-primary">
        <div class="panel-heading">

            <h3>{{collegeVM.College.Name}} <small><a href="#/CollegeEdit/{{collegeVM.College.Id}}">Edit</a></small></h3>
            <h4 class="text-muted">{{collegeVM.College.Location}}</h4>

        </div>
        <div class="panel-body">
            <div class="col col-sm-6">

                <p>{{collegeVM.College.Description}}</p>
            </div>
            <div class="col col-sm-6">


                <table class="table">
                    <tr>
                        <td>Students:</td>
                        <td>{{collegeVM.College.StudentCount | number}}</td>
                    </tr>
                    <tr>
                        <td>Faculty:</td>
                        <td>{{collegeVM.College.FacultyCount | number}}</td>
                    </tr>
                </table>

            </div>
        </div>

        <div class="row">
            <div class="col col-xs-11" style="float:none;margin: 0 auto;">


                <div class="panel panel-default">
                    <div class="panel-heading"><h4>Average Ratings</h4></div>

                    <div class="panel-body">

                        <table class="table">

                            <tbody>
                                <tr>
                                    <td data-ng-hide="collegeVM.averageOverall">Not yet rated...</td>
                                </tr>
                                <tr data-ng-show="collegeVM.averageOverall">
                                    <td><strong>Overall Rating</strong></td>
                                    <td><strong>{{collegeVM.averageOverall | number : 1}} / 5.0</strong></td>
                                </tr>
                                <tr data-ng-show="collegeVM.averageEdQuality">
                                    <td>Education Quality</td>
                                    <td>{{collegeVM.averageEdQuality | number : 1}} / 5.0</td>
                                </tr>
                                <tr data-ng-show="collegeVM.averageCampLife">
                                    <td>Campus Life</td>
                                    <td>{{collegeVM.averageCampLife | number : 1}} / 5.0</td>
                                </tr>
                                <tr data-ng-show="collegeVM.averageSafety">
                                    <td>Safety and Security</td>
                                    <td>{{collegeVM.averageSafety | number : 1}} / 5.0</td>
                                </tr>
                                <tr data-ng-show="collegeVM.averageJob">
                                    <td>Job Placement</td>
                                    <td>{{collegeVM.averageJob | number : 1}} / 5.0</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="row">
    <div class="panel panel-default">
        <div class="panel-heading"><h4>Reviews <small data-ng-hide="inEdit||inNewComment"><a href="" data-ng-click="newReview()">+Add Review</a></small></h4></div>
        <div class="panel-body">

            <div data-ng-show="inEdit||inNewComment">
                <form>
                    <textarea class="form-control" data-ng-model="tempReview.Comment" rows="12" placeholder="Comment..."></textarea>

                    <div class="panel panel-default text-center" style="margin-top:20px;">

                        <div class="panel-heading">

                            <div class="row">


                                <div class="col-xs-12 col-sm-2"><strong>Rating</strong></div>
                                <div class="col-xs-2 col-sm-1"><strong>N/A</strong></div>
                                <div class="col-xs-2 col-sm-1"><strong>Terrible</strong></div>
                                <div class="col-xs-2 col-sm-1"><strong>Poor</strong></div>
                                <div class="col-xs-2 col-sm-1"><strong>Good</strong></div>
                                <div class="col-xs-2 col-sm-1"><strong>Great</strong></div>
                                <div class="col-xs-2 col-sm-1"><strong>Excellent</strong></div>
                            </div>
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-xs-12 col-sm-2">Education Quality</div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.EducationQuality" type="radio" name="EducationQuality" value="0" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.EducationQuality" type="radio" name="EducationQuality" value="1" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.EducationQuality" type="radio" name="EducationQuality" value="2" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.EducationQuality" type="radio" name="EducationQuality" value="3" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.EducationQuality" type="radio" name="EducationQuality" value="4" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.EducationQuality" type="radio" name="EducationQuality" value="5" data-integer /></div>
                            </div>
                            <div class="row">
                                <div class="col-xs-12 col-sm-2">Campus Life</div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.CampusLife" type="radio" name="CampusLife" value="0" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.CampusLife" type="radio" name="CampusLife" value="1" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.CampusLife" type="radio" name="CampusLife" value="2" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.CampusLife" type="radio" name="CampusLife" value="3" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.CampusLife" type="radio" name="CampusLife" value="4" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.CampusLife" type="radio" name="CampusLife" value="5" data-integer /></div>
                            </div>
                            <div class="row">
                                <div class="col-xs-12 col-sm-2">Safety &amp; Security</div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.SafetySecurity" type="radio" name="SafetySecurity" value="0" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.SafetySecurity" type="radio" name="SafetySecurity" value="1" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.SafetySecurity" type="radio" name="SafetySecurity" value="2" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.SafetySecurity" type="radio" name="SafetySecurity" value="3" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.SafetySecurity" type="radio" name="SafetySecurity" value="4" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.SafetySecurity" type="radio" name="SafetySecurity" value="5" data-integer /></div>
                            </div>
                            <div class="row">
                                <div class="col-xs-12 col-sm-2">Job Placement</div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.JobPlacement" type="radio" name="JobPlacement" value="0" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.JobPlacement" type="radio" name="JobPlacement" value="1" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.JobPlacement" type="radio" name="JobPlacement" value="2" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.JobPlacement" type="radio" name="JobPlacement" value="3" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.JobPlacement" type="radio" name="JobPlacement" value="4" data-integer /></div>
                                <div class="col-xs-2 col-sm-1"><input class="form-control" data-ng-model="tempReview.JobPlacement" type="radio" name="JobPlacement" value="5" data-integer /></div>
                            </div>
                        </div>
                    </div>

                    <input data-ng-show="inNewComment" type="button" value="Save Review" data-ng-click="saveNewReview(tempReview)" class="btn btn-success form-control" />
                    <input data-ng-show="inEdit" type="button" value="Save Review" data-ng-click="saveEditReview(tempReview)" class="btn btn-success form-control" />
                    <input data-ng-show="inNewComment" type="button" value="Cancel" data-ng-click="cancelReview()" class="btn btn-warning form-control" />
                    <input data-ng-show="inEdit" type="button" value="Delete" data-ng-click="deleteReview(tempReview)" class="btn btn-warning form-control" />


                </form>
                <hr />
            </div>


            <div data-ng-hide="inEdit||inNewComment">

                <div data-ng-repeat="review in collegeVM.Reviews">
                    <div class="row">
                        <div class="col col-sm-5">
                            <h5>User Name writes... <small data-ng-hide="inEdit||inNewComment"><a href="" data-ng-click="editReview(review)">Edit</a></small></h5>
                            <p>{{review.Comment}}</p>

                        </div>
                        <div class="col col-sm-7">
                            <table class="table table-bordered">
                                <tbody>
                                    <tr data-ng-show="review.EducationQuality">
                                        <td>Education Quality</td>
                                        <td>{{review.EducationQuality}}</td>
                                    </tr>
                                    <tr data-ng-show="review.CampusLife">
                                        <td>Campus Life</td>
                                        <td>{{review.CampusLife}}</td>
                                    </tr>
                                    <tr data-ng-show="review.SafetySecurity">
                                        <td>Safety and Security</td>
                                        <td>{{review.SafetySecurity}}</td>
                                    </tr>
                                    <tr data-ng-show="review.JobPlacement">
                                        <td>Job Placement</td>
                                        <td>{{review.JobPlacement}}</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>


</div>
